<!DOCTYPE html>
<html>

<head>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="">
    <meta name="author" content="">

    <title>{$site.name}</title>

    <!-- Bootstrap Core CSS -->
    <link href="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
    <link href="__CDN__/assets/css/index.css" rel="stylesheet">

    <!-- Plugin CSS -->
    <link href="https://cdn.staticfile.org/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
    <link href="https://cdn.staticfile.org/simple-line-icons/2.4.1/css/simple-line-icons.min.css" rel="stylesheet">

    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!--[if lt IE 9]>
    <script src="https://cdn.staticfile.org/html5shiv/3.7.3/html5shiv.min.js"></script>
    <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
</head>

<body id="page-top">


<header>
    <div class="container">
        <div class="row">
            <div class="col-sm-12">
                <div class="header-content">
                    <div class="header-content-inner">
                        <h1><img width="200" src="{$ticket_img}"></h1>
                        {if condition="$mpType == 'auth'"}
                        <div>微信扫一扫，快速登录</div>
                        {else}
                        <div>微信扫一扫关注公众号</div>
                        <div>回复“ <span style="font-size: 16px;color:#f00;font-weight: bold">{$scene_id}</span> ”登录，60秒内有效 </div>
                        {/if}

                    </div>
                </div>
            </div>
        </div>
    </div>
</header>

<!-- jQuery -->
<script src=https://cdn.staticfile.org/jquery/2.1.4/jquery.min.js></script>

<!-- Bootstrap Core JavaScript -->
<script src="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script>
</body>
<script type="text/javascript">
    check_login();

    function check_login() {
        var url = "{:addon_url('wxfollowlogin/index/scan')}";
        $.post(url, {scene_id: '{$scene_id}'}, function (response) {

            var data = response.data;

            if (data.openid != "") {
                window.location.href = "/"
            } else {
                setTimeout("check_login()", 2000);
            }
        }, "json");
    }
</script>

</html>
